<!DOCTYPE html>
<html>
<head>
    <title>生成图标</title>
</head>
<body>
    <h2>生成简单图标</h2>
    <canvas id="icon16" width="16" height="16"></canvas>
    <canvas id="icon32" width="32" height="32"></canvas>
    <canvas id="icon48" width="48" height="48"></canvas>
    <canvas id="icon128" width="128" height="128"></canvas>
    
    <script>
        function createIcon(canvasId, size) {
            const canvas = document.getElementById(canvasId);
            const ctx = canvas.getContext('2d');
            
            // 设置背景色（浅蓝色）
            ctx.fillStyle = '#667eea';
            ctx.fillRect(0, 0, size, size);
            
            // 绘制简单的文档图标
            ctx.fillStyle = 'white';
            ctx.font = `${size * 0.6}px Arial`;
            ctx.textAlign = 'center';
            ctx.textBaseline = 'middle';
            ctx.fillText('📄', size/2, size/2);
            
            // 下载图标
            const link = document.createElement('a');
            link.download = `icon${size}.png`;
            link.href = canvas.toDataURL();
            link.click();
        }
        
        // 生成所有尺寸的图标
        createIcon('icon16', 16);
        createIcon('icon32', 32);
        createIcon('icon48', 48);
        createIcon('icon128', 128);
        
        alert('图标文件已生成并下载！请将下载的文件移动到icons文件夹中。');
    </script>
</body>
</html> 